package com.xauto.pioneer.appuser.model;

import org.json.JSONObject;

/**订单优惠模型
 * Created by Ellis.Li on 2017/5/12.
 */
public class VoucherDetailInfo extends BaseModel<VoucherDetailInfo> {

    /** 会员优惠券ID*/
    public String voucher_member_id;
    /** 优惠券名称*/
    public String voucher_name;
    /** 优惠券描述*/
    public String voucher_description;
    /** 优惠券有效期信息(例: 2017.3.10-2017.3.20)*/
    public String validate_date_description;
    /** 限制信息(例: 满100.00元可用)*/
    public String limit_description;
    /** 金额*/
    public String discount_amount;

    @Override
    public VoucherDetailInfo parse(JSONObject jsonObject) {
        if(jsonObject != null) {
            voucher_member_id = jsonObject.optString("voucher_member_id");
            voucher_name = jsonObject.optString("voucher_name");
            voucher_description = jsonObject.optString("voucher_description");
            limit_description = jsonObject.optString("limit_description");
            validate_date_description = jsonObject.optString("validate_date_description");
            discount_amount = jsonObject.optString("discount_amount");
            return this;
        }
        return null;
    }
}
